<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head th:replace="_header_include::frag(~{::title},~{::style},~{})">
    <title>我的客户</title>
    <style>
        button a{color:#fff!important;}
        .el-input{
            width: 90%;
        }
        .borderboxInfo .el-row{font-size: 14px;}
        .borderboxInfo .el-row .el-col{margin-bottom: 10px;width: 357px;}
        .borderboxInfo .el-row .el-col span:first-child{width:110px;text-align: right;float: left;}
        /*编辑备注*/
        .el-message-box__wrapper[aria-label="编辑备注"] .el-input:after {
            content: '编辑备注 ：';
            position: absolute;
            left: 10px;
            top: 0;}
        .el-message-box__wrapper[aria-label="编辑备注"] .el-input:before {
            content: '*';
            position: absolute;
            left: 0;
            color: red;
        }
        .el-message-box__wrapper[aria-label="编辑备注"] .el-input {
            width: 330px;
            padding-left: 75px;
        }
        .el-message-box__wrapper[aria-label="编辑备注"] .el-message-box__errormsg{
            padding-left: 75px;
        }
    </style>
</head>
<body>

<div id="businessContractRecord" class="businessContractRecord mainPadding" style="display: none;">
    <el-breadcrumb separator="/" class="elBreadcrumb marginB20">
        <el-breadcrumb-item>Home</el-breadcrumb-item>
        <el-breadcrumb-item>商务管理</el-breadcrumb-item>
        <el-breadcrumb-item v-if="type ==2">客户管理（商务）</el-breadcrumb-item>
        <el-breadcrumb-item v-else >我的客户（商务）</el-breadcrumb-item>
    </el-breadcrumb>
    <div class="mainSearchBg">
        <div class="marginB10">
            <span class="fs14 marginR10">签约单基本信息</span>
            <el-button v-show="showSignButtonFlag" type="primary" size="small" @click="editSign()">添加多个签约单</el-button>
            <el-button v-show="readonlyFalg&&paymentDetailsShow2" @click="recordDialogClick(1)" type="primary" size="small" >添加付款</el-button>
            <!-- <el-button @click="recordDialogClick(1)" type="primary" size="small" >添加付款</el-button> -->
        </div>
        <div class="borderbox padding20 marginB20 borderboxInfo">
            <el-row>
                <el-col>
                    <span>签约单编号：</span><span>{{signOrderBaseInfo[0].signNo}}</span>
                </el-col>
                <el-col>
                    <span>客户姓名：</span><span>{{signOrderBaseInfo[0].customerName}}</span>
                </el-col>
                <el-col>
                    <span>客户身份证号：</span><span>{{signOrderBaseInfo[0].idCard}}</span>
                </el-col>
                <el-col>
                    <span>客户联系电话：</span><span>{{signOrderBaseInfo[0].phone}}</span>
                </el-col>
                <el-col>
                    <span>签约餐饮公司：</span><span>{{signOrderBaseInfo[0].signCompanyName}}</span>
                </el-col>
                <el-col>
                    <span>签约项目：</span><span>{{signOrderBaseInfo[0].signProjectName}}</span>
                </el-col>
                <el-col>
                    <span>签约省份：</span><span>{{signOrderBaseInfo[0].signProvince}}</span>
                </el-col>
                <el-col>
                    <span>签约城市：</span><span>{{signOrderBaseInfo[0].signCity}}</span>
                </el-col>
                <el-col>
                    <span>签约区／县：</span><span>{{signOrderBaseInfo[0].signDictrict}}</span>
                </el-col>
                <el-col>
                    <span>签约店型：</span><span>{{signOrderBaseInfo[0].signShopTypeName}}</span>
                </el-col>
                <el-col>
                    <span>合同应收金额：</span><span>{{signOrderBaseInfo[0].amountReceivable}}</span>
                </el-col>
                <!--<el-col>-->
                <!--<span>路费：</span><span>{{signOrderBaseInfo[0].firstToll}}</span>-->
                <!--</el-col>-->
                <!--<el-col>-->
                <!--<span>优惠金额：</span><span>{{signOrderBaseInfo[0].preferentialAmount}}</span>-->
                <!--</el-col>-->
                <!--<el-col>-->
                <!--<span>赠送金额：</span><span>{{signOrderBaseInfo[0].giveAmount}}</span>-->
                <!--</el-col>-->
                <!--<el-col>-->
                <!--<span>赠送类型：</span><span>{{this.transGiveType(signOrderBaseInfo[0].giveType)}}</span>-->
                <!--</el-col>              -->
                <el-col>
                    <span>签约类型：</span>
                    <span>{{this.formatTypeFn(signOrderBaseInfo[0].signType)}}</span>
                </el-col>
                <el-col>
                    <span>是否远程签约：</span>
                    <span>{{this.formatRemoteFn(signOrderBaseInfo[0].isRemoteSign)}}</span>
                </el-col>
            </el-row>
        </div>
        <div v-show="signAddressShow">
            <div  class="marginB20 fs16 paddingT20">签约地址：</div>
            <div class="borderbox padding20">
                <el-row>
                    {{signOrderBaseInfo[0].signAddress}}
                </el-row>
            </div>
        </div>
        <div v-show="paymentDetailsShow">
            <div class="fs14 marginB10">全款付款明细</div>
            <el-table
                    ref="recordTable"
                    tooltip-effect="dark"
                    style="width: 100%;margin-bottom: 20px;"
                    border
                    :data="recordTable"
            >
                <shiro:hasPermission name="business:busCustomerManager:editPayAndSign">
                    <el-table-column align="center" label="操作" width="80">
                        <template slot-scope="scope">
                            <el-button type="success" size="small" @click="recordDialogClick1(scope.row,scope.row.id)">编辑</el-button>
                        </template>
                    </el-table-column>
                </shiro:hasPermission>
                <el-table-column align="center" prop="payName" label="付款人姓名"></el-table-column>
                <el-table-column align="center" prop="payMode" label="付款方式" width="200" :formatter="getPayModeText"></el-table-column>
                <el-table-column align="center" prop="statementNo" label="结算单编号"></el-table-column>
                <el-table-column align="center" prop="payTime" label="付款时间" width="150"></el-table-column>
                <el-table-column align="center" prop="amountReceived" label="实收金额" width="150"></el-table-column>
                <el-table-column align="center" prop="amountEquipment" label="实收设备金额" width="110"></el-table-column>
                <el-table-column align="center" prop="preferentialAmount" label="招商政策优惠金额" width="150"></el-table-column>
                <el-table-column align="center" prop="firstToll" label="路费" width="150"></el-table-column>
                <el-table-column align="center" prop="giveAmount" label="赠送金额" width="150"></el-table-column>
                <el-table-column align="center" prop="giveType" label="赠送类型" width="150" :formatter="transGiveType"></el-table-column>

                <el-table-column align="center" prop="amountPerformance" label="业绩金额" width="150"></el-table-column>
                <el-table-column align="center" prop="detailStatus" label="明细状态" width="150">
                    <template slot-scope="scope">
                        <div v-if="scope.row.detailStatus ==0">
                            无效
                        </div>
                        <div v-else-if="scope.row.detailStatus ==1">
                            审核中
                        </div>
                        <div v-else-if="scope.row.detailStatus ==2">
                            有效
                        </div>
                    </template>
                </el-table-column>
                <el-table-column align="center" prop="remarks" label="备注"></el-table-column>
            </el-table>
        </div>
        <div v-show="paymentDetailsShow2">
            <div class="fs14 marginB10">定金付款明细</div>
            <el-table
                    ref="recordTable2"
                    tooltip-effect="dark"
                    style="width: 100%;margin-bottom: 20px;"
                    border
                    :data="recordTable2"
            >
                <shiro:hasPermission name="business:busCustomerManager:editPayAndSign">
                    <el-table-column align="center" label="操作" width="80">
                        <template slot-scope="scope">
                            <el-button type="success" size="small" @click="recordDialogClick1(scope.row,scope.row.id)">编辑</el-button>
                        </template>
                    </el-table-column>
                </shiro:hasPermission>
                <el-table-column align="center" prop="payName" label="付款人姓名"></el-table-column>
                <el-table-column align="center" prop="payMode" label="付款方式"  width="200"  :formatter="getPayModeText">
                </el-table-column>
                <el-table-column align="center" prop="statementNo" label="结算单编号"></el-table-column>
                <el-table-column align="center" prop="payTime" label="付款时间" width="100"></el-table-column>
                <el-table-column align="center" prop="amountReceived" label="实收金额" width="110"></el-table-column>
                <el-table-column align="center" prop="amountEquipment" label="实收设备金额" width="110"></el-table-column>
                <el-table-column align="center" prop="preferentialAmount" label="招商政策优惠金额" width="150"></el-table-column>
                <el-table-column align="center" prop="firstToll" label="路费" width="150"></el-table-column>
                <el-table-column align="center" prop="giveAmount" label="赠送金额" width="150"></el-table-column>
                <el-table-column align="center" prop="giveType" label="赠送类型" width="150" :formatter="transGiveType"></el-table-column>
                <el-table-column align="center" prop="amountPerformance" label="业绩金额" width="110"></el-table-column>
                <el-table-column align="center" prop="amountBalance" label="余款金额" width="110"></el-table-column>
                <el-table-column align="center" prop="makeUpTime" label="预计余款补齐时间" width="150"></el-table-column>
                <el-table-column align="center" prop="detailStatus" label="明细状态" width="90">
                    <template slot-scope="scope">
                        <div v-if="scope.row.status ==1">
                            审核中
                        </div>
                        <div v-else-if="scope.row.status ==2">
                            有效
                        </div>
                        <div v-else-if="scope.row.status ==0">
                            无效
                        </div>
                    </template>
                </el-table-column>
                <el-table-column align="center" prop="remarks" label="备注"></el-table-column>
            </el-table>
        </div>
        <div v-show="paymentDetailsShow3">
            <div class="fs14 marginB10">追加定金付款明细</div>
            <el-table
                    ref="recordTable3"
                    tooltip-effect="dark"
                    style="width: 100%;margin-bottom: 20px;"
                    border
                    :data="recordTable3"
            >
                <shiro:hasPermission name="business:busCustomerManager:editPayAndSign">
                    <el-table-column align="center" label="操作" width="80">
                        <template slot-scope="scope">
                            <el-button type="success" size="small" @click="recordDialogClick1(scope.row,scope.row.id)">编辑</el-button>
                        </template>
                    </el-table-column>
                </shiro:hasPermission>
                <el-table-column align="center" prop="payName" label="付款人姓名"></el-table-column>
                <el-table-column align="center" prop="payMode" label="付款方式" width="200" :formatter="getPayModeText">
                </el-table-column>
                <el-table-column align="center" prop="statementNo" label="结算单编号"></el-table-column>
                <el-table-column align="center" prop="payTime" label="付款时间" width="100"></el-table-column>
                <el-table-column align="center" prop="amountReceived" label="实收金额" width="110"></el-table-column>
                <el-table-column align="center" prop="amountEquipment" label="实收设备金额" width="110"></el-table-column>
                <el-table-column align="center" prop="preferentialAmount" label="招商政策优惠金额" width="150"></el-table-column>
                <el-table-column align="center" prop="firstToll" label="路费" width="150"></el-table-column>
                <el-table-column align="center" prop="giveAmount" label="赠送金额" width="150"></el-table-column>
                <el-table-column align="center" prop="giveType" label="赠送类型" width="150" :formatter="transGiveType"></el-table-column>
                <el-table-column align="center" prop="amountPerformance" label="业绩金额" width="110"></el-table-column>
                <el-table-column align="center" prop="amountBalance" label="余款金额" width="110"></el-table-column>
                <el-table-column align="center" prop="makeUpTime" label="预计余款补齐时间" width="150"></el-table-column>
                <el-table-column align="center" prop="detailStatus" label="明细状态" width="150">
                    <template slot-scope="scope">
                        <div v-if="scope.row.status ==1">
                            审核中
                        </div>
                        <div v-else-if="scope.row.status ==2">
                            有效
                        </div>
                        <div v-else-if="scope.row.status ==0">
                            无效
                        </div>
                    </template>
                </el-table-column>
                <el-table-column align="center" prop="remarks" label="备注"></el-table-column>
            </el-table>
        </div>
        <div v-show="paymentDetailsShow4">
            <div class="fs16 marginB20">尾款付款明细</div>
            <el-table
                    ref="recordTable"
                    tooltip-effect="dark"
                    style="width: 100%;margin-bottom: 20px;"
                    border
                    :data="recordTable4"
            >
                <shiro:hasPermission name="business:busCustomerManager:editPayAndSign">
                    <el-table-column align="center" label="操作" width="80">
                        <template slot-scope="scope">
                            <el-button type="success" size="small" @click="recordDialogClick1(scope.row,scope.row.id)">编辑</el-button>
                        </template>
                    </el-table-column>
                </shiro:hasPermission>
                <el-table-column align="center" prop="payName" label="付款人姓名"></el-table-column>
                <el-table-column align="center" prop="payMode" label="付款方式" width="200" :formatter="getPayModeText">
                </el-table-column>
                <el-table-column align="center" prop="statementNo" label="结算单编号"></el-table-column>
                <el-table-column align="center" prop="payTime" label="付款时间" width="150"></el-table-column>
                <el-table-column align="center" prop="amountReceived" label="实收金额" width="150"></el-table-column>
                <el-table-column align="center" prop="amountEquipment" label="实收设备金额" width="110"></el-table-column>
                <el-table-column align="center" prop="preferentialAmount" label="招商政策优惠金额" width="150"></el-table-column>
                <el-table-column align="center" prop="firstToll" label="路费" width="150"></el-table-column>
                <el-table-column align="center" prop="giveAmount" label="赠送金额" width="150"></el-table-column>
                <el-table-column align="center" prop="giveType" label="赠送类型" width="150" :formatter="transGiveType"></el-table-column>
                <el-table-column align="center" prop="amountPerformance" label="业绩金额" width="150"></el-table-column>
                <el-table-column align="center" prop="detailStatus" label="明细状态" width="150">
                    <template slot-scope="scope">
                        <div v-if="scope.row.status == 1">
                            审核中
                        </div>
                        <div v-else-if="scope.row.status ==2">
                            有效
                        </div>
                        <div v-else-if="scope.row.status ==0">
                            无效
                        </div>
                    </template>
                </el-table-column>
                <el-table-column align="center" prop="remarks" label="备注"></el-table-column>
            </el-table>
        </div>
        <div v-show="refundDetailsShow">
            <div class="fs14 marginB10" style="color: red">该签约单已退款</div>
            <el-table ref="refundTable" tooltip-effect="dark" style="width: 100%;margin-bottom: 20px;" border :data="refundTable">
                <el-table-column align="center" prop="refundTime" label="退款时间" width="250"></el-table-column>
                <el-table-column align="center" prop="cusAmount" label="退款金额" width="250"></el-table-column>
                <el-table-column align="center" prop="reason" label="退款原因"></el-table-column>
            </el-table>
        </div>
    </div>
    <el-dialog title="编辑签约单" width="870px" :visible.sync="dialogUpdateFormSigningVisible">
        <template>
            <!--<el-tabs v-model="editableTabsValue" type="card" @tab-click="tabClick">-->
            <!--<el-tab-pane :key="item.name" v-for="(item, index) in editableTabs" :label="item.title" :name="item.name">-->
            <!--</el-tab-pane>-->
            <!--</el-tabs>-->
            <el-form :model="updateFormSigning" :rules="rules" ref="updateFormSigning">

                <div class="paddB20">签约单信息</div>
                <div>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="签约单编号：" :label-width="formLabelWidth" prop="signNo">
                                <el-input :disabled="notEditRebutSign" v-model="updateFormSigning.signNo" maxLength="20"
                                          disabled></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="客户姓名：" :label-width="formLabelWidth" prop="customerName">
                                <el-input :disabled="notEditRebutSign"
                                          v-model="updateFormSigning.customerName"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="客户身份证号：" :label-width="formLabelWidth" prop="idCard">
                                <el-input :disabled="notEditRebutSign" v-model="updateFormSigning.idCard"
                                          maxLength="20"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="客户联系电话：" :label-width="formLabelWidth" prop="phone">
                                <el-input :disabled="notEditRebutSign" v-model="updateFormSigning.phone" maxLength="50" onkeyup="this.value=this.value.replace(/[^\d\,，]/g,'')"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="签约餐饮公司：" :label-width="formLabelWidth" prop="signCompanyId">
                                <el-select :disabled="notEditRebutSign" v-model="updateFormSigning.signCompanyId"
                                           placeholder="请选择签约餐饮公司" style="width:100%;" clearable filterable>
                                    <el-option v-for="item in companyArr" :key="item.id" :label="item.companyName"
                                               :value="item.id"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="签约项目：" :label-width="formLabelWidth" prop="signProjectId">
                                <el-select :disabled="notEditRebutSign" clearable filterable @change="getShopType" v-model="updateFormSigning.signProjectId"
                                           placeholder="请选择" style="width:100%;" >
                                    <el-option v-for="item in projectArr" :key="item.id" :label="item.projectName"
                                               :value="item.id"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="签约省份：" :label-width="formLabelWidth" prop="signProvince">
                                <el-select :disabled="notEditRebutSign" v-model="updateFormSigning.signProvince"
                                           placeholder="请选择签约省份" @change="changeUpdateSignProvince" style="width:100%;" clearable filterable>
                                    <el-option v-for="item in provinceArr" :key="item.name" :label="item.name"
                                               :value="item.name"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="签约城市：" :label-width="formLabelWidth" prop="signCity">
                                <el-select :disabled="notEditRebutSign" v-model="updateFormSigning.signCity"
                                           placeholder="请选择签约城市：" clearable filterable @change="changeUpdateSignCity" style="width:100%;">
                                    <el-option v-for="item in cityArr" :key="item.name" :label="item.name"
                                               :value="item.name"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="签约区/县：" :label-width="formLabelWidth" prop="signDictrict">
                                <el-select :disabled="notEditRebutSign" clearable filterable v-model="updateFormSigning.signDictrict"
                                           placeholder="请选择签约区/县" style="width:100%;">
                                    <el-option v-for="item in districtArr" :key="item.name" :label="item.name"
                                               :value="item.name"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="签约店型：" :label-width="formLabelWidth" prop="signShopType">
                                <el-select :disabled="notEditRebutSign" v-model="updateFormSigning.signShopType"
                                           placeholder="请选择" style="width:100%;">
                                    <el-option v-for="item in signStoreTypeArr" :key="item.value" :label="item.name"
                                               :value="item.value"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="合同应收金额：" :label-width="formLabelWidth" prop="amountReceivable">
                                <el-input :disabled="notEditRebutSign" v-model="updateFormSigning.amountReceivable"
                                          type="number" min="0" oninput="if(value.length>10)value=value.slice(0,10)"
                                          onkeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))"
                                          autocomplete="off" maxLength="10" style="width: 80%;"></el-input>
                                <span style="padding-left: 10px;">元</span>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="签约类型：" :label-width="formLabelWidth" prop="signType"
                                          style="width: 100%;">
                                <el-select v-model="updateFormSigning.signType" @change="selectUpdateSigningType" placeholder="请选择签约类型：" style="width:100%" :disabled="isEditSigningDisable">
                                    <el-option
                                            v-for="item in option2s"
                                            :key="item.value"
                                            :label="item.label"
                                            :value="item.value">
                                    </el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="是否远程签约：" :label-width="formLabelWidth" prop="isRemoteSign">
                                <el-select v-model="updateFormSigning.isRemoteSign" placeholder="请选择是否远程签约：" @change="updateSelectIsRemoteSign" style="width: 100%;">
                                    <el-option
                                            v-for="item in isSignArr"
                                            :key="item.value"
                                            :label="item.name"
                                            :value="item.value">
                                    </el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                    </el-row>
                </div>


                <div class="paddB20">付款明细</div>
                <el-row>
                    <el-col :span="12">
                        <!-- 编辑付款明细 -->
                        <el-form-item label="付款类型：" :label-width="formLabelWidth" prop="payType" v-if="isEditSigning">
                            <el-select v-model="updateFormSigning.payType" :disabled="payTypeSelect"
                                       placeholder="请选择签约付款类型" @change="changePayType" style="width:100%;">
                                <el-option
                                        v-for="item in payTypeArr"
                                        :key="item.value"
                                        :label="item.label"
                                        :value="item.value">
                                </el-option>
                            </el-select>
                        </el-form-item>
                        <!-- 添加付款 -->
                        <el-form-item label="付款类型：" :label-width="formLabelWidth" prop="payType" v-else="isEditSigning">
                            <el-select v-model="updateFormSigning.payType" placeholder="请选择签约付款类型" @change="payTypeChange" style="width:100%">
                                <el-option label="追加定金" value="3"></el-option>
                                <el-option label="尾款" value="4"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="付款人姓名：" :label-width="formLabelWidth" prop="payName">
                            <el-input v-model="updateFormSigning.payName" maxLength="10"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="12">
                        <el-form-item label="付款时间：" :label-width="formLabelWidth" prop="payTime">
                            <el-date-picker
                                    type="date"
                                    format="yyyy-MM-dd"
                                    placeholder="选择日期"
                                    v-model="updateFormSigning.payTime"
                                    style="width: 90%;"></el-date-picker>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="付款方式：" :label-width="formLabelWidth" prop="payModes">
                            <el-select v-model="updateFormSigning.payModes" placeholder="请选择付款方式：" multiple style="width:100%" >
                                <el-option
                                        v-for="item in option3s"
                                        :key="item.value"
                                        :label="item.label"
                                        :value="item.name">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row v-if="showfalg">
                    <el-col :span="12">
                        <el-form-item label="余款金额：" :label-width="formLabelWidth" prop="amountBalance">
                            <el-input v-model="updateFormSigning.amountBalance"  type="number" min="0" oninput="if(value.length>10)value=value.slice(0,10)"  onkeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" maxLength="10" autocomplete="off" width="80%" ></el-input>
                            <span style="padding-left: 10px;">元</span>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="预计余款补齐时间：" :label-width="formLabelWidth" prop="makeUpTime">
                            <el-date-picker
                                    type="date"
                                    format="yyyy-MM-dd"
                                    placeholder="选择日期"
                                    v-model="updateFormSigning.makeUpTime"
                                    style="width: 90%;"></el-date-picker>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="12">
                        <el-form-item label="实收金额：" :label-width="formLabelWidth" prop="amountReceived">
                            <el-input v-model="updateFormSigning.amountReceived"  @input="updateFormSigningAmountPerformance" type="number" min="0" oninput="if(value.length>10)value=value.slice(0,10)"  onkeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" autocomplete="off" width="80%"></el-input>
                            <span style="padding-left: 10px;">元</span>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="实收设备金额：" :label-width="formLabelWidth" prop="amountEquipment">
                            <el-input v-model="updateFormSigning.amountEquipment"  @input="updateFormSigningAmountPerformance" type="number" min="0" oninput="if(value.length>10)value=value.slice(0,10)"  onkeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" autocomplete="off" width="80%"></el-input>
                            <span style="padding-left: 10px;">元</span>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="12">
                        <el-form-item label="业绩金额：" :label-width="formLabelWidth" prop="performanceAmount">
                            <el-input v-model="updateFormSigning.performanceAmount"  type="number"oninput="if(value.length>10)value=value.slice(0,10)"  onkeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" min="0" maxLength="10" style="width:80%"></el-input>
                            <span style="padding-left: 10px;">元</span>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="路费（报首次）：" :label-width="formLabelWidth" prop="firstToll">
                            <el-input @input="formSigningAmountPerformance" v-model="updateFormSigning.firstToll"  type="number"  min="0" oninput="if(value.length>10)value=value.slice(0,10)"  onkeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" autocomplete="off" maxLength="10" style="width: 80%;"></el-input>
                            <span style="padding-left: 10px;">元</span>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="12">
                        <el-form-item label="招商政策优惠金额：" :label-width="formLabelWidth" prop="preferentialAmount">
                            <el-input v-model="updateFormSigning.preferentialAmount"  type="number" min="0" oninput="if(value.length>10)value=value.slice(0,10)"  onkeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" autocomplete="off" maxLength="10" style="width: 80%;"></el-input><span style="padding-left: 10px;">元</span>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="赠送金额：" :label-width="formLabelWidth" prop="giveAmount">
                            <el-input v-model="updateFormSigning.giveAmount"  type="number"  min="0" oninput="if(value.length>10)value=value.slice(0,10)"  onkeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" autocomplete="off" maxLength="10" style="width: 80%;"></el-input><span style="padding-left: 10px;">元</span>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="10">
                        <el-form-item label="赠送类型：" :label-width="formLabelWidth" prop="giveType">
                            <el-select v-model="updateFormSigning.giveType" clearable  placeholder="请选择赠送类型：" style="width:100%;">
                                <el-option
                                        v-for="item in giveTypeList"
                                        :key="item.value"
                                        :label="item.name"
                                        :value="item.value">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="备注" :label-width="formLabelWidth">
                            <el-input type="textarea" v-model="updateFormSigning.remarks" maxLength="200"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row v-if="suppWrapBox">
                    <el-button v-if="shouAddVisitButton" type="text" @click="suppDetailShow">添加补充到访记录</el-button><el-button v-if="!shouAddVisitButton" type="text" @click="suppDetailHide">取消添加</el-button><span style="font-size:14px;color: #ccc;">(若无到访记录可不填写)</span>
                    <!-- <div class="paddB20">补充到访记录<i class="el-icon-caret-bottom" @click="suppShow"></i><i class="el-icon-caret-top" @click="suppHide"></i><span style="font-size:14px;color: #ccc;">(若无到访记录可不填写)</span></div> -->
                    <div v-if="suppWrap">
                        <el-row>
                            <el-col :span="12">
                                <el-form-item label="到访时间：" :label-width="formLabelWidth" prop="visitTime">
                                    <el-date-picker
                                            type="datetime"
                                            format="yyyy-MM-dd HH:mm"
                                            placeholder="选择日期"
                                            v-model="updateFormSigning.visitTime" style="width: 90%;"></el-date-picker>
                                </el-form-item>
                            </el-col>
                            <el-col :span="12">
                                <el-form-item label="到访城市：" :label-width="formLabelWidth"  prop="arrVisitCity">
                                    <!--       <el-input  v-model="updateFormSigning.arrVisitCity" maxLength="50" >
                                           </el-input>-->

                                    <el-select v-model="updateFormSigning.arrVisitCity" placeholder="请选择" clearable
                                               style="width:100%">
                                        <el-option v-for="item in visitCityArr" :key="item.name" :label="item.name"
                                                   :value="item.name"></el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="12">
                                <el-form-item label="到访类型：" :label-width="formLabelWidth" prop="visitType">
                                    <el-select v-model="updateFormSigning.visitType" placeholder="请选择到访类型" style="width:100%">
                                        <el-option
                                                v-for="item in visitTypeArr"
                                                :key="item.value"
                                                :label="item.name"
                                                :value="item.value">
                                        </el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                            <el-col :span="12">
                                <el-form-item label="到访店铺类型：" :label-width="formLabelWidth" prop="visitShopType">
                                    <el-select v-model="updateFormSigning.visitShopType" placeholder="请选择到访店铺类型" style="width:100%">
                                        <el-option
                                                v-for="item in vistitStoreTypeArr"
                                                :key="item.value"
                                                :label="item.name"
                                                :value="item.value">
                                        </el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="12">
                                <el-form-item label="到访人数：" :label-width="formLabelWidth" prop="visitNum">
                                    <el-input  v-model="updateFormSigning.visitNum" type="number"  min="1" maxLength="2" oninput="if(value.length>2)value=value.slice(0,2)"  onkeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" style="width:80%">
                                    </el-input>
                                    <span style="padding-left: 10px;">人</span>
                                </el-form-item>
                            </el-col>
                        </el-row>
                    </div>
                </el-row>
            </el-form>
            <div class="dialog-footer f-tac">
                <el-button type="primary" v-if="clickVal==0" @click="submitUpdateForm('updateFormSigning')" :disabled="updateSignButtonAble">提交</el-button>
                <el-button type="success" v-else="clickVal==1" @click="submitUpdateForm1('updateFormSigning')">提交</el-button>
                <el-button @click="dialogUpdateFormSigningVisible = false">取 消</el-button>
            </div>
        </template>
    </el-dialog>
    <el-dialog title="添加签约单信息" width="870px" :visible.sync="dialogFormSigningVisible">
        <template>
            <el-form :model="formSigning" ref="formSigning"  :rules="rules">
                <div class="fs16 marginB20">签约单信息</div>
                <div>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="客户姓名：" :label-width="formLabelWidth" prop="customerName">
                                <el-input v-model="formSigning.customerName" maxLength="10"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="客户身份证号：" :label-width="formLabelWidth" prop="idCard">
                                <el-input v-model="formSigning.idCard" maxLength="20" ></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="客户联系电话：" :label-width="formLabelWidth" prop="phone">
                                <el-input v-model="formSigning.phone" maxLength="50" onkeyup="this.value=this.value.replace(/[^\d\,，]/g,'')"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="签约餐饮公司：" :label-width="formLabelWidth" prop="signCompanyId">
                                <el-select v-model="formSigning.signCompanyId" placeholder="请选择签约餐饮公司" style="width: 100%;" clearable filterable>
                                    <el-option v-for="item in companyArr" :key="item.id" :label="item.companyName" :value="item.id"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="签约项目：" :label-width="formLabelWidth" prop="signProjectId">
                                <el-select v-model="formSigning.signProjectId"  clearable filterable @change="getShopType" placeholder="请选择" style="width: 100%;">
                                    <el-option v-for="item in projectArr" :key="item.id" :label="item.projectName" :value="item.id"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="签约省份：" :label-width="formLabelWidth" prop="signProvince">
                                <el-select v-model="formSigning.signProvince" placeholder="请选择签约省份" style="width: 100%;" @change="changeProvince" clearable filterable>
                                    <el-option v-for="item in provinceArr" :key="item.name" :label="item.name" :value="item.name"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="签约城市：" :label-width="formLabelWidth" prop="signCity">
                                <el-select v-model="formSigning.signCity" placeholder="请选择签约城市：" clearable filterable  @change="changeCity" style="width: 100%;">
                                    <el-option v-for="item in cityArr" :key="item.name" :label="item.name" :value="item.name"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="签约区/县：" :label-width="formLabelWidth" prop="signDictrict">
                                <el-select v-model="formSigning.signDictrict" clearable filterable placeholder="请选择签约区/县" style="width: 100%;">
                                    <el-option v-for="item in districtArr" :key="item.name" :label="item.name" :value="item.name"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="签约店型：" :label-width="formLabelWidth" prop="signShopType">
                                <el-select v-model="formSigning.signShopType" placeholder="请选择" style="width: 100%;">
                                    <el-option v-for="item in signStoreTypeArr" :key="item.value" :label="item.name" :value="item.value"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="合同应收金额：" :label-width="formLabelWidth" prop="amountReceivable">
                                <el-input v-model="formSigning.amountReceivable"  type="number"
                                          oninput="if(value.length>10)value=value.slice(0,10)"   min="0" onkeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))"
                                          autocomplete="off" maxLength="10" style="width: 80%;"></el-input>
                                <span style="padding-left: 10px;">元</span>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="签约类型：" :label-width="formLabelWidth" prop="signType">
                                <el-select v-model="formSigning.signType" @change="selectSigningType" placeholder="请选择签约类型：" style="width: 100%;">
                                    <el-option
                                            v-for="item in option2s"
                                            :key="item.value"
                                            :label="item.label"
                                            :value="item.value">
                                    </el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="是否远程签约：" :label-width="formLabelWidth" prop="isRemoteSign">
                                <el-select v-model="formSigning.isRemoteSign"  placeholder="请选择是否远程签约：" style="width: 100%;" @change="selectIsRemoteSign">
                                    <el-option
                                            v-for="item in isSignArr"
                                            :key="item.value"
                                            :label="item.name"
                                            :value="item.value">
                                    </el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                    </el-row>
                </div>
                <div v-if="isshowVisit">
                    <div class="paddB20">
                        <!--补充到访记录<i class="el-icon-caret-bottom" @click="suppShow"></i><i class="el-icon-caret-top" @click="suppHide"></i><span style="font-size:14px;color: #ccc;">(若无到访记录可不填写)</span>-->
                        <el-button v-if="shouAddVisitButton" type="text" @click="suppShow">添加补充到访记录</el-button><el-button v-if="!shouAddVisitButton" type="text" @click="suppHide">取消添加</el-button><span style="font-size:14px;color: #ccc;">(若无到访记录可不填写)</span>
                    </div>
                    <div v-if="suppWrap">
                        <el-row>
                            <el-col :span="12">
                                <el-form-item label="到访时间：" :label-width="formLabelWidth" prop="visitTime">
                                    <el-date-picker
                                            type="datetime"
                                            format="yyyy-MM-dd HH:mm"
                                            placeholder="选择日期"
                                            v-model="formSigning.visitTime" style="width: 90%;"></el-date-picker>
                                </el-form-item>
                            </el-col>
                            <el-col :span="12">
                                <el-form-item label="到访城市：" :label-width="formLabelWidth"  prop="arrVisitCity">
                                    <!-- -   <el-input  v-model="formSigning.arrVisitCity" maxLength="50" >
                                       </el-input>-->
                                    <el-select v-model="formSigning.arrVisitCity" placeholder="请选择" clearable
                                               style="width:100%">
                                        <el-option v-for="item in visitCityArr" :key="item.name" :label="item.name"
                                                   :value="item.name"></el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                        </el-row>

                        <el-row>
                            <el-col :span="12">
                                <el-form-item label="到访类型：" :label-width="formLabelWidth"   prop="visitType">
                                    <el-select v-model="formSigning.visitType" placeholder="请选择到访类型" style="width: 100%;">
                                        <el-option
                                                v-for="item in visitTypeArr"
                                                :key="item.value"
                                                :label="item.name"
                                                :value="item.value">
                                        </el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                            <el-col :span="12">
                                <el-form-item label="到访店铺类型：" :label-width="formLabelWidth"  prop="visitShopType">
                                    <el-select v-model="formSigning.visitShopType" placeholder="请选择到访店铺类型" style="width: 100%;">
                                        <el-option
                                                v-for="item in vistitStoreTypeArr"
                                                :key="item.value"
                                                :label="item.name"
                                                :value="item.value">
                                        </el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="12">
                                <el-form-item label="到访人数：" :label-width="formLabelWidth"  prop="visitNum">
                                    <el-input  v-model="formSigning.visitNum" type="number"  min="1" maxLength="2" oninput="if(value.length>2)value=value.slice(0,2)"  onkeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" style="width:80%;">
                                    </el-input>
                                    <span style="padding-left: 10px;">人</span>
                                </el-form-item>
                            </el-col>
                        </el-row>
                    </div>
                </div>
                <div class="paddB20">付款明细</div>
                <div>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="付款类型：" :label-width="formLabelWidth" prop="payType">
                                <el-select v-model="formSigning.payType" placeholder="请选择签约付款类型" disabled style="width: 100%;">
                                    <el-option  key="1" label="全款" value="1"></el-option>
                                    <el-option  key="2" label="定金" value="2"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="付款人姓名：" :label-width="formLabelWidth" prop="payName">
                                <el-input v-model="formSigning.payName" maxLength="10"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="付款时间：" :label-width="formLabelWidth" prop="payTime">
                                <el-date-picker
                                        type="date"
                                        format="yyyy-MM-dd"
                                        placeholder="选择日期"
                                        v-model="formSigning.payTime"
                                        style="width: 90%;"></el-date-picker>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="付款方式：" :label-width="formLabelWidth" prop="payModes">
                                <el-select v-model="formSigning.payModes" placeholder="请选择付款方式：" multiple style="width: 100%;">
                                    <el-option
                                            v-for="item in option3s"
                                            :key="item.value"
                                            :label="item.label"
                                            :value="item.name">
                                    </el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row v-if="isAllMoney" >
                        <el-col :span="12">
                            <el-form-item label="余款金额：" :label-width="formLabelWidth" prop="amountBalance">
                                <el-input maxLength="10" v-model="formSigning.amountBalance"  type="number"  min="0" oninput="if(value.length>10)value=value.slice(0,10)"  onkeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" style="width: 80%;"></el-input>
                                <span style="padding-left: 10px;">元</span>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="预计余款补齐时间：" :label-width="formLabelWidth" prop="makeUpTime">
                                <el-date-picker
                                        type="date"
                                        format="yyyy-MM-dd"
                                        placeholder="选择日期"
                                        v-model="formSigning.makeUpTime"
                                        style="width: 90%;"></el-date-picker>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="实收金额：" :label-width="formLabelWidth" prop="amountReceived">
                                <!-- <el-input maxLength="10" v-model="formSigning.amountReceived"  type="number"  min="0" oninput="if(value.length>10)value=value.slice(0,10)"  onkeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))"  style="width: 80%;" ></el-input> -->
                                <el-input @input="formSigningAmountPerformance" maxLength="10" v-model="formSigning.amountReceived"  type="number"  min="0" oninput="if(value.length>10)value=value.slice(0,10)"  onkeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))"  style="width: 80%;" ></el-input>
                                <span style="padding-left: 10px;">元</span>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="实收设备金额：" :label-width="formLabelWidth" prop="amountEquipment">
                                <el-input @input="formSigningAmountPerformance" maxLength="10" v-model="formSigning.amountEquipment"  type="number"  min="0" oninput="if(value.length>10)value=value.slice(0,10)"  onkeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))"  style="width: 80%;" ></el-input>
                                <span style="padding-left: 10px;">元</span>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="业绩金额：" :label-width="formLabelWidth" prop="performanceAmount">
                                <!-- <el-input maxLength="10" v-model="formSigningAmountPerformance"  type="number"  min="0" oninput="if(value.length>10)value=value.slice(0,10)"  onkeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))"  style="width: 80%;"></el-input> -->
                                <el-input maxLength="10" v-model="formSigning.performanceAmount" min="0" @keyup.native="number" style="width: 80%;"></el-input>
                                <span style="padding-left: 10px;">元</span>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="路费（报首次）：" :label-width="formLabelWidth" prop="firstToll">
                                <!-- <el-input v-model="formSigning.firstToll"  type="number"  min="0" oninput="if(value.length>10)value=value.slice(0,10)"  onkeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" autocomplete="off" maxLength="10" style="width: 80%;"></el-input> -->
                                <el-input @input="formSigningAmountPerformance" v-model="formSigning.firstToll"  type="number"  min="0" oninput="if(value.length>10)value=value.slice(0,10)"  onkeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" autocomplete="off" maxLength="10" style="width: 80%;"></el-input>
                                <span style="padding-left: 10px;">元</span>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="招商政策优惠金额：" :label-width="formLabelWidth" prop="preferentialAmount">
                                <el-input v-model="formSigning.preferentialAmount"  type="number" min="0" oninput="if(value.length>10)value=value.slice(0,10)"  onkeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" autocomplete="off" maxLength="10" style="width: 80%;"></el-input><span style="padding-left: 10px;">元</span>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="赠送金额：" :label-width="formLabelWidth" prop="giveAmount">
                                <el-input v-model="formSigning.giveAmount"  type="number"  min="0" oninput="if(value.length>10)value=value.slice(0,10)"  onkeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))" autocomplete="off" maxLength="10" style="width: 80%;"></el-input><span style="padding-left: 10px;">元</span>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="10">
                            <el-form-item label="赠送类型：" :label-width="formLabelWidth" prop="giveType">
                                <el-select v-model="formSigning.giveType" clearable  placeholder="请选择赠送类型：" style="width:100%;">
                                    <el-option
                                            v-for="item in giveTypeList"
                                            :key="item.value"
                                            :label="item.name"
                                            :value="item.value">
                                    </el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="24">
                            <el-form-item label="备注" :label-width="formLabelWidth">
                                <el-input type="textarea" v-model="formSigning.remarks" maxLength="200"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                </div>
            </el-form>
            <div slot="footer" class="dialog-footer f-tac">
                <el-button type="primary" @click="submitForm('formSigning')" :disabled="addSignButtonAble">提 交</el-button>
                <el-button @click="dialogFormSigningVisible = false">取 消</el-button>
            </div>
        </template>
    </el-dialog>
    <div  v-show="uploadFileShow">
        <el-row>
            <el-table ref="multipleTable" :data="tableDataC1"
                      tooltip-effect="dark" style="width: 100%"
                      border>
                <el-table-column type="selection" prop="id" width="55"         align="center">
                </el-table-column>
                <el-table-column prop="uploadUserName" label="上传人姓名" align="center">
                </el-table-column>
                <el-table-column prop="uploadTime" label="上传时间" align="center">
                </el-table-column>
                <el-table-column prop="fileName" label="文件名称" align="center">
                </el-table-column>
                <el-table-column label="操作" align="center">
                    <template slot-scope="scope">
                        <el-button size="mini" type="text" @click="handleOperateFn(scope.$index, scope.row)">
                            {{scope.row.fileType !=="jpg" && scope.row.fileType !=="png" && scope.row.fileType !=="jpeg" && scope.row.fileType !=="gif" && scope.row.fileType !=="bmp"? '下载录音':'查看图片'}}
                        </el-button>
                    </template>
                </el-table-column>
                <el-table-column prop="delStatus" label="删除状态" align="center">
                    <template slot-scope="scope">
                        <div v-if="scope.row.delStatus === 0">未删除</div>
                        <div v-else-if="scope.row.delStatus ===1" class="redcolor">已删除</div>
                    </template>
                </el-table-column>
            </el-table>
        </el-row>
    </div>
    <div  class="padding20 f-tac">
        <el-button type="primary" @click="goback()">返回</el-button>
    </div>
    <!-- 上传资源dialog -->
    <el-dialog title="查看图片" :visible.sync="dialogFormUploadImg" width="1100px">
        <div class="padding20" style="text-align: center;">
            <img :src="dialogFormUploadImgSrc" alt="" max-width="1000px">
        </div>
    </el-dialog>
</div>

<!-- import common js-->
<div th:include="_footer_include :: #jsLib"></div>
<!--<script th:src="@{/js/excel/xlsx.min.js}" src="../static/js/excel/xlsx.min.js"></script>-->
<script src="/js/common/download.js"></script>
<script th:src="@{/js/custom/callrecord/download.js?v=1.0.0}"></script>
<script th:inline="javascript">
    var roleCode =  [[${roleCode}]];
    var vclueId = [[${clueId}]];
    var vsignId = [[${signId}]];
    var readOnly = [[${readyOnly}]];
    var showSignButton = [[${showSignButton}]]
    var payType = [[${payType}]];
    var signData = [[${signData}]];
    var PayAllData = [[${PayAllData}]];
    var oneData = [[${oneData}]];
    var twoData = [[${twoData}]];
    var threeData = [[${threeData}]];
    var proSelect=[[${proSelect}]];
    var giveTypeList =[[${giveTypeList}]];
    var payModeItem =[[${payModeItem}]];
    //退款信息数据
    var refundData = [[${refundData}]];
    var refundStatus = [[${refundStatus}]];
    var customerName = [[${customerName}]];
    var type=[[${type}]];
    var clueFileList = [[${clueFileList}]];//上传文件
    var ossUrl = [[${ossUrl}]];//上传文件地

    var one ;
    var two ;
    var three;
    var four ;
    var signAddressShow = false;
    var uploadFileShow =false;
    //签约单地址是否展示
    debugger;
    if (roleCode == 'GLY' && signData[0].signAddress != null){
        signAddressShow = true;
    }
    //上传附件是否展示
    if (roleCode == 'GLY' && clueFileList != null && clueFileList.length>0){
        uploadFileShow = true;
    }
    var may
    if(payType==1){
        one = true;
        two = false;
        three = false;
        four = false;
    }else if(payType==2){
        one = false;
        two = true;
        three = false;
        four = false;
    }else if(payType==3){
        one = false;
        two = true;
        three = true;
        four = false;
    }else{
        one = false;
        two = true;
        if(twoData.length==0){
            three = false;
        }else{
            three = true;
        }
        four = true;
    }
    if (refundStatus == 4 || refundStatus == 6) {
        may = true;
    }else{
        may = false;
    }


    var vreadonlyFalg = true;
    if(readOnly==1){
        vreadonlyFalg = false;
    }

    var showSignButtonFlag = true;
    if(showSignButton==1){
        showSignButtonFlag = false;
    }


    // 查询 模块
    var mainDivVM = new Vue({
        el: '#businessContractRecord',
        data: {
            tableDataC1: clueFileList,//文件记录
            isEditSigning:false,//默认是添加付款，不是编辑付款明细
            isEditSigningDisable:true,//默认是添加付款，签约类型不可点击
            clickVal:0,//默认是添加付款提交按钮点击
            suppWrapBox:true,//默认显示添加补充到访记录
            type:type,
            signOrderBaseInfo:signData,//签约单基本信息
            giveTypeList:giveTypeList,
            addSignButtonAble:false,
            addPayDetailButtonAble:false,
            shouAddVisitButton:false,
            dialogFormVisible:false,//弹窗是否显示
            dialogFormUploadImg: false, //上传资源图片弹框
            dialogFormUploadImgSrc: '', //上传资源图片弹框
            //是否显示签约单地址
            signAddressShow:signAddressShow,
            //是否显示上传的附件
            uploadFileShow:uploadFileShow,
            dialogFormSigningVisible:false,//添加签约单
            paymentDetailsShow:one,//判断全款付款明细表格是否显示
            paymentDetailsShow2:two,//判断定金付款明细表格是否显示
            paymentDetailsShow3:three,//判断二次定金付款明细表格是否显示
            paymentDetailsShow4:four,//判断尾款付款明细表格是否显示
            refundDetailsShow: may,//判断退款明细表格是否显示
            readonlyFalg:vreadonlyFalg,
            showSignButtonFlag:showSignButtonFlag,
            dialogUpdateFormSigningVisible: false,
            payTypeSelect: false,
            updateSignButtonAble: false,
            notEditRebutSign: false,
            updateFormSigning: {
                payTime: new Date(),
                giveType: "",
                signId: "",
                clueId: "",
                signNo: '',
                customerName: "",
                idCard: '',
                phone: '',
                signCompanyId: '',
                signProjectId: '',
                signProvince: '',
                signCity: '',
                signDictrict: '',
                signShopType: '',
                amountReceivable: '',
                firstToll: '',
                preferentialAmount: '',
                signType: "1",
                giveAmount: '',
                rebutTime: "",
                rebutReason: "",
                isRemoteSign: 0,

                payDetailId: "",
                payType: '',//去掉默认的3，改成点击添加付款时候是3
                payName: '',
                payModes: [],
                payMode: '',
                amountReceived: '',
                amountBalance: '',
                makeUpTime: '',
                amountPerformance: '',
                performanceAmount: '',
                remarks: '', //备注
                signRejectRecordList:[],//驳回原因
                visitType:'',
                visitShopType:'',
                visitNum:'',
                arrVisitCity:'',
                visitTime:''

            },
            showfalg:true,
            dialogFormType:'',
            formLabelWidth: '150px',
            recordTableInfo:signData,
            recordTable:PayAllData,
            recordTable2:oneData,
            recordTable3:twoData,
            recordTable4:threeData,
            refundTable:refundData,
            vistitStoreTypeArr:[],
            signStoreTypeArr: [],
            provinceArr:[],
            districtArr:[],
            visitCityArr:[],
            cityArr:[],
            companyArr:[],
            projectArr:proSelect,
            isAllMoney:false,
            isshowVisit:true,//是否显示到访记录
            suppWrap:false,
            dialogForm:{
                reason:''
            },
            dialogRules:{
                reason: [
                    { required: true, message: '请输入驳回原因', trigger: 'blur' }
                ]
            },
            detailRules:{
                payType: [
                    { required: true, message: '请选择付款类型', trigger: 'change' }
                ],
                payName: [
                    {required: true, message: '请输入付款人姓名', trigger: 'blur'}
                ],
                payModes: [
                    { required: true,validator:function(rule,value,callback){
                            if(value.length==0){
                                callback(new Error("请选择付款方式"));
                            }else{
                                callback();
                            }
                        }, trigger: 'change' }
                ],
                payMode: [
                    { required: true,message:"请选择付款方式", trigger: 'change' }
                ],
                payTime: [
                    { type: 'date', required: true, message: '请选择付款时间', trigger: 'change' }
                ],
                amountReceived: [
                    { required: true,validator:function(rule,value,callback){
                            var reg =  /^[0-9]+[0-9]*]*$/ ;
                            if(value ==null || value =="null" || value ==""  ){
                                callback(new Error("请输入实收金额"));
                                mainDivVM.formMoneyDetail.amountReceived =null;

                            }else  if(value !=null && value !="null" && value !="" && !reg.test(value) ){
                                callback(new Error("请输入正整数"));
                                mainDivVM.formMoneyDetail.amountReceived =null;
                            }else{
                                callback();
                            }
                        }, trigger: 'change'}
                ],
                amountBalance: [
                    { required: true,validator:function(rule,value,callback){
                            var reg =  /^[0-9]+[0-9]*]*$/ ;
                            if(value ==null || value =="null" || value ==""  ){
                                callback(new Error("请输入余款金额"));
                                mainDivVM.formMoneyDetail.amountBalance =null;

                            }else  if(value !=null && value !="null" && value !="" && !reg.test(value) ){
                                callback(new Error("请输入正整数"));
                                mainDivVM.formMoneyDetail.amountBalance =null;
                            }else{
                                callback();
                            }

                        }, trigger: 'change'}
                ],
                makeUpTime: [
                    { type: 'date', required: true, message: '请选择预计余款补齐时间', trigger: 'change' }
                ],
                performanceAmount: [
                    { required: true,validator:function(rule,value,callback){
                            var reg =  /^[0-9]+[0-9]*]*$/ ;
                            if(value ==null || value =="null" || value ==""  ){
                                callback(new Error("请输入业绩金额"));
                                mainDivVM.formMoneyDetail.amountPerformance =null;

                            }else  if(value !=null && value !="null" && value !="" && !reg.test(value) ){
                                callback(new Error("请输入正整数"));
                                mainDivVM.formMoneyDetail.amountPerformance =null;
                            }else{
                                callback();
                            }
                        }, trigger: 'change'}
                ],

                preferentialAmount: [
                    { required: true,validator:function(rule,value,callback){
                            var reg =  /^[0-9]+[0-9]*]*$/ ;
                            if(value ==null || value =="null" || value ==""  ){
                                callback(new Error("请输入招商政策优惠金额"));
                                mainDivVM.formMoneyDetail.preferentialAmount =null;

                            }else  if(value !=null && value !="null" && value !="" && !reg.test(value) ){
                                callback(new Error("请输入正整数"));
                                mainDivVM.formMoneyDetail.preferentialAmount =null;
                            }else{
                                callback();
                            }
                        }, trigger: 'change'}
                ],

                firstToll: [
                    { required: true,validator:function(rule,value,callback){
                            var reg =  /^[0-9]+[0-9]*]*$/ ;
                            if(value ==null || value =="null" || value ==""  ){
                                callback(new Error("请输入路费（报首次）"));
                                mainDivVM.formMoneyDetail.firstToll =null;

                            }else  if(value !=null && value !="null" && value !="" && !reg.test(value) ){
                                callback(new Error("请输入正整数"));
                                mainDivVM.formMoneyDetail.firstToll =null;
                            }else{
                                callback();
                            }
                        }, trigger: 'change'}
                ],

                giveAmount: [
                    {required: true, message: '请输入赠送金额', trigger: 'blur'},
                    { required: true,validator:function(rule,value,callback){
                            var reg =  /^[0-9]+[0-9]*]*$/ ;
                            if(value ==null || value =="null" || value ==""  ){
                                callback(new Error("请输入赠送金额"));
                                mainDivVM.formMoneyDetail.giveAmount =null;

                            }else  if(value !=null && value !="null" && value !="" && !reg.test(value) ){
                                callback(new Error("请输入正整数"));
                                mainDivVM.formMoneyDetail.giveAmount =null;
                            }else{
                                callback();
                            }
                        }, trigger: 'change'}
                ],

                visitTime: [ //请选择到访时间
                    { required: true, message: '请选择到访时间', trigger: 'change' }
                ],
                arrVisitCity: [ //请填写来访城市
                    { required: true, message: '请填写到访城市', trigger: 'change' }
                ],
                visitType: [ //请选择到访类型
                    { required: true, message: '请选择到访类型', trigger: 'change' }
                ],
                visitShopType: [ //请选择到访店铺类型
                    { required: true, message: '请选择到访店铺类型', trigger: 'change' }
                ],
                visitNum: [ //请填写到访人数
                    { required: true,validator:function(rule,value,callback){
                            var reg =  /^[0-9]+[0-9]*]*$/ ;
                            if(value ==null || value =="null" || value ==""  ){
                                callback(new Error("请填写到访人数"));
                                mainDivVM.formMoneyDetail.visitNum =null;

                            }else  if(value !=null && value !="null" && value !="" && !reg.test(value) ){
                                callback(new Error("请输入正整数"));
                                mainDivVM.formMoneyDetail.visitNum =null;
                            }else{
                                callback();
                            }

                        }, trigger: 'change'}
                ],
            },
            rules: {
                customerName: [
                    { required: true, message: '请输入客户姓名', trigger: 'blur' }
                ],
                idCard: [
                    { required: true, message: '请输入客户身份证号', trigger: 'blur' }
                ],
                phone: [
                    { required: true, message: '请输入客户联系电话', trigger: 'blur' }
                ],
                signCompanyId: [
                    { required: true, message: '请选择签约餐饮公司', trigger: 'change' }
                ],
                signProjectId: [
                    { required: true, message: '请选择签约项目', trigger: 'change' }
                ],
                signProvince: [
                    { required: true, message: '请选择签约省份', trigger: 'change' }
                ],
                // signCity: [
                //     { required: true, message: '请选择签约城市', trigger: 'change' }
                // ],
                // signDictrict: [
                //     { required: true, message: '请选择签约区/县', trigger: 'change' }
                // ],
                signShopType: [
                    { required: true, message: '请选择签约店型', trigger: 'change' }
                ],
                amountReceivable: [
                    {required: true, message: '请输入合同应收金额', trigger: 'blur'},
                    {
                        validator: function (rule, value, callback) {
                            if (value === 0) {
                                callback();
                            }
                            var reg = /^[0-9]+[0-9]*]*$/;
                            if (value == null || value == "null" || value == "") {
                                callback(new Error("请输入合同应收金额"));
                                mainDivVM.formSigning.amountReceivable = null;

                            } else if (value != null && value != "null" && value != "" && !reg.test(value)) {
                                callback(new Error("请输入正整数"));
                                mainDivVM.formSigning.amountReceivable = null;
                            } else {
                                callback();
                            }
                        }, trigger: 'change'
                    }
                ],
                signType: [
                    { required: true, message: '请选择签约类型', trigger: 'change' }
                ],

                firstToll: [
                    { required: true,validator:function(rule,value,callback){
                            var reg =  /^[0-9]+[0-9]*]*$/ ;
                            if(value ==null || value =="null" || value ==""  ){
                                callback(new Error("请输入路费（报首次）"));
                                mainDivVM.formSigning.firstToll =null;

                            }else  if(value !=null && value !="null" && value !="" && !reg.test(value) ){
                                callback(new Error("请输入正整数"));
                                mainDivVM.formSigning.firstToll =null;
                            }else{
                                callback();
                            }
                        }, trigger: 'change'}
                ],
                preferentialAmount: [
                    { required: true,validator:function(rule,value,callback){
                            var reg =  /^[0-9]+[0-9]*]*$/ ;
                            if(value ==null || value =="null" || value ==""  ){
                                callback(new Error("请输入招商政策优惠金额"));
                                mainDivVM.formSigning.preferentialAmount =null;

                            }else  if(value !=null && value !="null" && value !="" && !reg.test(value) ){
                                callback(new Error("请输入正整数"));
                                mainDivVM.formSigning.preferentialAmount =null;
                            }else{
                                callback();
                            }
                        }, trigger: 'change'}
                ],
                giveAmount: [
                    {required: true, message: '请输入赠送金额', trigger: 'blur'},
                    { required: true,validator:function(rule,value,callback){
                            var reg =  /^[0-9]+[0-9]*]*$/ ;
                            if(value ==null || value =="null" || value ==""  ){
                                callback(new Error("请输入赠送金额"));
                                mainDivVM.formSigning.giveAmount =null;

                            }else  if(value !=null && value !="null" && value !="" && !reg.test(value) ){
                                callback(new Error("请输入正整数"));
                                mainDivVM.formSigning.giveAmount =null;
                            }else{
                                callback();
                            }
                        }, trigger: 'change'}
                ],
                payType: [
                    { required: true, message: '请选择付款类型', trigger: 'change' }
                ],
                payName: [
                    {required: true, message: '请输入付款人姓名', trigger: 'blur'}
                ],
                payModes: [
                    { required: true,validator:function(rule,value,callback){
                            if(value.length==0){
                                callback(new Error("请选择付款方式"));
                            }else{
                                callback();
                            }
                        }, trigger: 'change' }
                ],
                payMode: [
                    { required: true, message: '请选择付款方式', trigger: 'change' }
                ],
                payTime: [
                    { type: 'date', required: true, message: '请选择时间', trigger: 'change' }
                ],
                amountReceived: [
                    {required: true, message: '请输入实收金额', trigger: 'blur'},
                    { required: true,validator:function(rule,value,callback){
                            var reg =  /^[0-9]+[0-9]*]*$/ ;
                            if(value ==null || value =="null" || value ==""  ){
                                callback(new Error("请输入实收金额"));
                                mainDivVM.formSigning.amountReceived =null;

                            }else  if(value !=null && value !="null" && value !="" && !reg.test(value) ){
                                callback(new Error("请输入正整数"));
                                mainDivVM.formSigning.amountReceived =null;
                            }else{
                                callback();
                            }
                        }, trigger: 'change'}
                ],
                amountBalance: [
                    { required: true,validator:function(rule,value,callback){
                            var reg =  /^[0-9]+[0-9]*]*$/ ;
                            if(value ==null || value =="null" || value ==""  ){
                                callback(new Error("请输入余款金额"));
                                mainDivVM.formSigning.amountBalance =null;

                            }else  if(value !=null && value !="null" && value !="" && !reg.test(value) ){
                                callback(new Error("请输入余款金额"));
                                mainDivVM.formSigning.amountBalance =null;
                            }else{
                                callback();
                            }
                        }, trigger: 'change'}
                ],
                makeUpTime: [
                    { type: 'date', required: true, message: '请选择预计余款补齐时间', trigger: 'change' }
                ],
                performanceAmount: [
                    { required: true, message: '请输入业绩金额', trigger: 'blur' },
                    { validator:function(rule,value,callback){
                            if(value=="0"){
                                callback();
                            }
                            var reg =  /^\+?[1-9][0-9]*$/ ;
                            if(value !=null && value !="null" && value !="" && !reg.test(value) ){
                                callback(new Error("请输入整数"));
                            }else{
                                callback();
                            }
                        }, trigger: 'blur'}
                ],
                isRemoteSign: [ //是否远程签约
                    { required: true, message: '请选择是否远程签约', trigger: 'change' }
                ],
                visitTime: [ //请选择到访时间
                    { required: true, message: '请选择到访时间', trigger: 'change' }
                ],
                arrVisitCity: [ //请填写来访城市
                    { required: true, message: '请填写到访城市', trigger: 'change' }
                ],
                visitType: [ //请选择到访类型
                    { required: true, message: '请选择到访类型', trigger: 'change' }
                ],
                visitShopType: [ //请选择到访店铺类型
                    { required: true, message: '请选择到访店铺类型', trigger: 'change' }
                ],
                visitNum: [ //请填写到访人数
                    { required: true,validator:function(rule,value,callback){
                            var reg =  /^[0-9]+[0-9]*]*$/ ;
                            if(value ==null || value =="null" || value ==""  ){
                                callback(new Error("请填写到访人数"));
                                // mainDivVM.formSigning.visitNum ='';

                            }else  if(value !=null && value !="null" && value !="" && !reg.test(value) ){
                                callback(new Error("请输入正整数"));
                                // mainDivVM.formSigning.visitNum ='';
                            }else{
                                callback();
                            }

                        }, trigger: 'blur'}
                ],

            },
            formMoneyDetail: {
                clueId:"",
                visitTime:"",
                arrVisitCity:"",
                visitType:"",
                visitShopType:"",
                visitNum:"",

                signId:'',
                payType:'',
                payModes:[],
                payMode:'',
                amountReceived: '',
                amountBalance: '',
                makeUpTime:'',
                payTime: new Date(),
                amountPerformance:'',
                performanceAmount:'',
                remarks:"",
                payName:customerName,
                firstToll:'',
                preferentialAmount:'',
                giveAmount:'',
                giveType:''
            },

            formSigning: {
                clueId:"",
                signNo:'',
                customerName: '',
                idCard: '',
                phone: '',
                signCompanyId:'',
                signProjectId: '',
                signProvince:'',
                signCity: '',
                signDictrict:'',
                signShopType:'',
                amountReceivable:'',
                signType:'',
                isRemoteSign:'',
                firstToll:'',
                preferentialAmount:'',
                giveAmount:'',
                giveType:'',

                visitTime:"",
                arrVisitCity:"",
                visitType:"",
                visitShopType:"",
                visitNum:"",

                payType:1,
                payModes:[],
                payMode:'',
                amountReceived: '',
                amountBalance: '',
                makeUpTime:'',
                payTime: new Date(),
                amountPerformance:'',
                remarks:"",
                performanceAmount:'',//业绩金额
                payName:'',
                amountEquipment:"",//实收设备金额
            },
            option2s: [{
                value: '1',
                label: '一次性全款'
            },{
                value: '2',
                label: '先交定金'
            }],

            isSignArr:[{value:0,name:'否'},{value:1,name:'是'}],
            visitTypeArr:[{value:1,name:'预约来访'},{value:2,name:'慕名来访'},{value:3,name:'临时来访'}],
            option2s: [{value: 1, label: '一次性全款'},{value: 2, label: '先付定金'}],
            option3s: [],
            payTypeArr:[{value: "1", label: '全款'},{value: "2", label: '定金'},{value: "3", label: '追加定金'},{value: "4", label: '尾款'}],
            payTypeArr1:[{value: "1", label: '全款'},{value: "2", label: '定金'},{value: "3", label: '追加定金'},{value: "4", label: '尾款'}],
            payDetailId:'',//选择修改付款明细的id
        },
        computed: {
        },
        methods: {
            getShopType(value,flag){
                var param = {};
                param.id = value;
                axios.post('/busVisitRecord/getShortTypeByProjectId', param).then(function (response) {
                    console.log("###"+response.data.data);

                    if(!flag){
                        if(mainDivVM.formSigning.signShopType){
                            mainDivVM.formSigning.signShopType ='';
                        }
                        if(mainDivVM.formSigning.visitShopType){
                            mainDivVM.formSigning.visitShopType ='';
                        }
                        if(mainDivVM.updateFormSigning.signShopType){
                            mainDivVM.updateFormSigning.signShopType ='';
                        }
                        if(mainDivVM.updateFormSigning.visitShopType){
                            mainDivVM.updateFormSigning.visitShopType ='';
                        }
                    }
                    mainDivVM.vistitStoreTypeArr= response.data.data;
                    mainDivVM.signStoreTypeArr= response.data.data;
                });
            },
            formatTypeFn(value){//
                if(value=="1"){
                    value="一次性全款"
                }else if(value=="2"){
                    value="先交定金"
                }
                return value;
            },
            formatRemoteFn(value){//
                if(value=="0"){
                    value="否"
                }else if(value=="1"){
                    value="是"
                }
                return value;
            },
            transGiveType(row, column, value, index) {
                var text="";
                for(var i=0;i<giveTypeList.length;i++) {
                    if(giveTypeList[i].value ==value){
                        text = giveTypeList[i].name;
                    }
                }
                return text;
            },
            formMoneyDetailAmountPerformance() {
                // this.formMoneyDetail.performanceAmount= this.formMoneyDetail.amountReceived;
                var aone = parseFloat(this.formMoneyDetail.amountReceived);
                var atwo = parseFloat(this.formMoneyDetail.firstToll);
                if(isNaN(aone)) aone = 0
                if(isNaN(atwo)) atwo = 0
                // return (aone + atwo)+""
                this.formMoneyDetail.performanceAmount=(aone + atwo)+ ""
            },
            formSigningAmountPerformance(){
                var aone = parseFloat(this.formSigning.amountReceived);
                var atwo = parseFloat(this.formSigning.firstToll);
                var athree = parseFloat(this.formSigning.amountEquipment);
                if(isNaN(aone)) aone = 0
                if(isNaN(atwo)) atwo = 0
                if (isNaN(athree)) athree = 0
                // return (aone + atwo)+""
                this.formSigning.performanceAmount=(aone + atwo + athree)+ ""
            },
            number4(){
                this.formMoneyDetail.amountReceived=this.formMoneyDetail.amountReceived.replace(/[^\.\d]/g,'');
                this.formMoneyDetail.amountReceived=this.formMoneyDetail.amountReceived.replace('.','');
            },
            number5(){
                this.formMoneyDetail.amountBalance=this.formMoneyDetail.amountBalance.replace(/[^\.\d]/g,'');
                this.formMoneyDetail.amountBalance=this.formMoneyDetail.amountBalance.replace('.','');
            },
            number6(){
                this.formMoneyDetail.amountPerformance=this.formMoneyDetail.amountPerformance.replace(/[^\.\d]/g,'');
                this.formMoneyDetail.amountPerformance=this.formMoneyDetail.amountPerformance.replace('.','');
            },

            getPayModeText(row, column, value, index){
                var valText="";
                if(!value){
                    return valText;
                }
                var vals = value.split(",");
                if(payModeItem){
                    for(var j = 0 ; j < vals.length;j++  ){
                        for(var i = 0; i < payModeItem.length ; i++){
                            if(payModeItem[i].value == vals[j]){
                                if(j==0){
                                    valText += payModeItem[i].name;
                                }else{
                                    valText += ","+payModeItem[i].name;
                                }

                            }
                        }
                    }
                }

                return valText;
            },
            handleOperateFn(index, row) { //上传资源"查看图片,下载录音"

                if (row.fileType == 'mp3'|| row.fileType == 'mp4' || row.fileType == 'wav' || row.fileType == 'wma'|| row.fileType == '3gpp' || row.fileType == 'm4a' ||row.fileType == 'ape'|| row.fileType == 'midi' || row.fileType == 'amr'|| row.fileType == 'MP3'|| row.fileType == 'MP4' ||row.fileType == 'WAV' || row.fileType == 'WMA'|| row.fileType == '3GPP' || row.fileType == 'M4A' ||row.fileType == 'APE'|| row.fileType == 'MIDI' || row.fileType == 'AMR') {
                    var x = new XMLHttpRequest();
                    x.open("GET", row.filePath, true);
                    x.responseType = 'blob';
                    x.onload = function (e) {
                        download(x.response, row.fileName, "audio/mp3");
                    };
                    x.send();
                } else {
                    this.dialogFormUploadImgSrc = row.filePath;
                    this.dialogFormUploadImg = true;
                }

            },
            recordDialogClick(type){
                this.isEditSigning=false;//添加付款，不是编辑
                this.isEditSigningDisable=true;//添加付款弹窗，签约类型不可选
                this.clickVal=0;//添加付款提交按钮点击
                this.updateFormSigning.payType='3';//默认是追加定金

                this.suppWrapBox=true;// 默认显示 到访记录 填写部分
                this.suppWrap =false; // 默认关闭 到访记录 填写部分
                if(type==1){//定金添加付款按钮点击
                    this.dialogFormVisible=true
                }else if(type==2){//二次定金添加付款按钮点击
                    this.dialogFormVisible=true
                }else if(type==3){//尾款添加付款按钮点击
                    this.dialogFormVisible=true
                    this.payType='3'
                }
                // this.formMoneyDetail={}; // 将formMoneyDetail设置为空
                this.resetForm('updateFormSigning'); //重置校验状态
                this.shouAddVisitButton = true;
                this.dialogUpdateFormSigningVisible = true;
                this.suppWrap = false;
                var obj = {clueId:vclueId,signId:vsignId};
                this.editRebutSign(obj);
                // 给已选编辑付款明细id赋值
                this.payDetailId="";
            },
            recordDialogClick1(row,val){//点击编辑付款明细
                console.log(row)
                console.log(val)
                this.isEditSigning=true;//编辑付款明细
                this.isEditSigningDisable=false;//编辑付款明细弹窗，签约类型可选
                this.clickVal=1;//编辑付款明细提交按钮点击
                this.suppWrapBox =false; // 不显示 到访记录 填写部分
                this.resetForm('updateFormSigning'); //重置校验状态
                this.dialogUpdateFormSigningVisible = true;
                var obj = {clueId:vclueId,signId:vsignId};
                this.editRebutSign(obj);
                // 给已选编辑付款明细id赋值
                this.payDetailId=val;
                // 回显付款明细
            debugger
                // 付款时间
                this.updateFormSigning.payTime=row.payTime;
                // 签约类型和付款类型
                this.updateFormSigning.payType=row.payType;//付款类型
                if (row.payType > 2) {
                    if (row.payType == 3) {
                        mainDivVM.showfalg = true;
                    } else {
                        mainDivVM.showfalg = false;
                    }
                    this.payTypeSelect = false;
                    this.payTypeArr = this.payTypeArr1.slice(2, 4)
                } else {
                    if (row.payType == 1) {
                        this.showfalg = false;
                    } else {
                        this.showfalg = true;
                    }
                    this.payTypeSelect = true;
                    this.payTypeArr = this.payTypeArr1.slice(0, 2)
                }
                // 付款方式
                if(row.payMode){
                    var modeArr = row.payMode.split(",");
                    this.updateFormSigning.payModes = this.tansPayModeValueToName(modeArr);
                }
                // 余款金额
                if(row.amountBalance){
                    this.updateFormSigning.amountBalance=row.amountBalance;
                }else if(row.amountBalance==0){
                    this.updateFormSigning.amountBalance=row.amountBalance+"";
                }

                // 预计余款补齐时间
                if(row.makeUpTime){
                    this.updateFormSigning.makeUpTime=row.makeUpTime;
                }
                // 实收金额
                if(row.amountReceived){
                    this.updateFormSigning.amountReceived=row.amountReceived
                }else if(row.amountReceived==0){
                    this.updateFormSigning.amountReceived=row.amountReceived+"";
                }
                // 实收设备金额
                if(row.amountEquipment){
                    this.updateFormSigning.amountEquipment=row.amountEquipment
                }else if(row.amountEquipment==0){
                    this.updateFormSigning.amountEquipment=row.amountEquipment+"";
                }
                // 业绩金额
                if(row.amountPerformance){
                    this.updateFormSigning.performanceAmount=row.amountPerformance;
                }else if(row.amountPerformance==0){
                    this.updateFormSigning.performanceAmount=row.amountPerformance+"";
                }
                // 路费（报首次）
                if(row.firstToll){
                    this.updateFormSigning.firstToll=row.firstToll;
                }else if(row.firstToll==0){
                    this.updateFormSigning.firstToll=row.firstToll+"";
                }
                // 招商政策优惠金额
                if(row.preferentialAmount){
                    this.updateFormSigning.preferentialAmount=row.preferentialAmount;
                }else if(row.preferentialAmount==0){
                    this.updateFormSigning.preferentialAmount=row.preferentialAmount+"";
                }
                // 赠送金额
                if(row.giveAmount){
                    this.updateFormSigning.giveAmount=row.giveAmount
                }else if(row.giveAmount==0){
                    this.updateFormSigning.giveAmount=row.giveAmount+"";
                }
                // 赠送类型
                if(row.giveType){
                    if(row.giveType ==null || row.giveType =='-1'){
                        this.updateFormSigning.giveType = null;
                    }else{
                        this.updateFormSigning.giveType = row.giveType + "";
                    }
                }
                // 备注
                if(row.remarks){
                    this.updateFormSigning.remarks=row.remarks;
                }

            },
            tansPayModeValueToName(payModes){//付款方式转换
                var payModeArr = [];
                for(var i = 0 ; i < payModes.length;i++){
                    for(var j = 0 ; j < mainDivVM.option3s.length ; j++){
                        if(payModes[i]== mainDivVM.option3s[j].value){
                            payModeArr.push( mainDivVM.option3s[j].name);
                        }
                    }
                }
                return payModeArr;
            },
            payTypeChange(val){
                if(val==3){
                    this.showfalg = true;
                }else{
                    this.showfalg = false;
                }
            },
            selectSigningType(pa1) { //是不是全款
                // this.formSigning.amountBalance = null;
                // this.formSigning.makeUpTime = null;
                if( pa1=='1' ){
                    this.formSigning.payType = '1';
                    this.isAllMoney = false;
                }else{
                    this.formSigning.payType = '2';
                    this.isAllMoney = true;
                }
            },
            editSign(){
            debugger
                this.suppWrap = true;
                this.shouAddVisitButton = false;
                mainDivVM.resetForm('formSigning');
                var param = {};
                param.id = vclueId;
                mainDivVM.isAllMoney = false
                this.suppWrap =true; // 默认关闭 到访记录 填写部分
                this.shouAddVisitButton = false;
                axios.post('/businesssign/echo',param).then(function (response) {
                    console.log(response)
                    mainDivVM.formSigning = response.data.data;
                    mainDivVM.signStoreTypeArr = response.data.data.vistitStoreTypeArr;
                    mainDivVM.vistitStoreTypeArr = response.data.data.vistitStoreTypeArr;
                    mainDivVM.formSigning.clueId=vclueId;
                    mainDivVM.dialogFormSigningVisible = true;
                    mainDivVM.currentProvince(mainDivVM.formSigning.signProvince);
                    mainDivVM.currentCity(mainDivVM.formSigning.signCity);
                    mainDivVM.formSigning.payName = response.data.data.customerName;
                    if(response.data.data.visitShopType){
                        mainDivVM.formSigning.visitShopType = ""+response.data.data.visitShopType;
                    }
                    // 判断是否远程签约
                    if(response.data.data.isRemoteSign&&response.data.data.isRemoteSign==1){//1是远程签约，不显示到访记录
                        mainDivVM.isshowVisit=false;
                    }else{
                        mainDivVM.isshowVisit=true;
                    }
                });
            },
            currentProvince(selVal){
                if(!selVal){
                    return false;
                }
                param={};
                param.type="1";
                param.name=selVal;
                axios.post('/area/sysregion/querySysRegionByParam',param).then(function (response) {
                    mainDivVM.cityArr=response.data.data.data;
                });
            },
            currentCity(selVal){
                if(!selVal){
                    return false;
                }
                param={};
                param.type="2";
                param.name=selVal;
                axios.post('/area/sysregion/querySysRegionByParam',param).then(function (response) {
                    mainDivVM.districtArr=response.data.data.data;
                });
            },

            changeProvince(selVal){
                mainDivVM.formSigning.signCity = '';
                mainDivVM.formSigning.signDictrict='';
                this.currentProvince(selVal);
            },
            changeCity(selVal){
                mainDivVM.formSigning.signDictrict='';
                this.currentCity(selVal);
            },
            selectIsRemoteSign (pa1) { //是否远程签约event
                // if( pa1==1 ){
                //     this.suppWrap = false;
                // }else{
                //     this.suppWrap = true;
                // }
                if (pa1 == 1) {//1是远程签约
                    this.isshowVisit = false;
                    // //清空补充到访记录数据
                    // this.formSigning.arrVisitCity = '';
                    // this.formSigning.visitNum = '';
                    // this.formSigning.visitShopType = '';
                    // this.formSigning.visitTime = new Date();;
                    // this.formSigning.visitType = 1;
                } else {
                    this.isshowVisit = true;
                }
            },
            updateSelectIsRemoteSign(pa1) { //是否远程签约event
                if (pa1 == 1) {//1是远程签约
                    this.suppWrapBox = false;
                } else {
                    this.suppWrapBox = true;
                }
            },
            suppShow(){ //补充到访记录展开
                this.suppWrap = true;
                this.shouAddVisitButton = false;
                //清空补充到访记录数据
                var param = {};
                param.id = vclueId;
                axios.post('/businesssign/visitEcho',param).then(function (response) {
                    var echoData = response.data.data;
                    if(echoData.arrVisitCity){
                        mainDivVM.formSigning.arrVisitCity = echoData.arrVisitCity;
                    }
                    if(echoData.visitNum>0){
                        mainDivVM.formSigning.visitNum=echoData.visitNum;
                    }
                    if(echoData.visitShopType){
                        mainDivVM.formSigning.visitShopType = ""+response.data.data.visitShopType;
                    }
                    mainDivVM.formSigning.visitType= 1;
                    mainDivVM.formSigning.visitTime=new Date();
                });
            },
            suppHide(){
                this.suppWrap = false;
                this.shouAddVisitButton = true;
                if(this.formSigning.arrVisitCity){
                    this.formSigning.arrVisitCity = '';
                }
                if(this.formSigning.visitNum){
                    this.formSigning.visitNum='';
                }
                if(this.formSigning.visitShopType){
                    this.formSigning.visitShopType='';
                }
                if(this.formSigning.visitTime){
                    this.formSigning.visitTime='';
                }
                if(this.formSigning.visitType){
                    this.formSigning.visitType='';
                }
            },

            suppDetailShow(){ //补充到访记录展开
                this.suppWrap = true;
                this.shouAddVisitButton = false;
                //清空补充到访记录数据
                var param = {};
                param.id = vclueId;
                axios.post('/businesssign/visitEcho',param).then(function (response) {
                    var echoData = response.data.data;
                    if(echoData.arrVisitCity){
                        mainDivVM.updateFormSigning.arrVisitCity = echoData.arrVisitCity;
                    }
                    if(echoData.visitNum>0){
                        mainDivVM.updateFormSigning.visitNum=echoData.visitNum;
                    }
                    if(echoData.visitShopType){
                        mainDivVM.updateFormSigning.visitShopType = ""+echoData.visitShopType;
                    }
                    mainDivVM.updateFormSigning.visitType= 1;
                    mainDivVM.updateFormSigning.visitTime=new Date();
                });
            },
            suppDetailHide(){
                this.suppWrap = false;
                this.shouAddVisitButton = true;
                if(this.updateFormSigning.arrVisitCity){
                    this.updateFormSigning.arrVisitCity = '';
                }
                if( this.updateFormSigning.visitNum){
                    this.updateFormSigning.visitNum='';
                }
                if( this.updateFormSigning.visitShopType){
                    this.updateFormSigning.visitShopType='';
                }
                if( this.updateFormSigning.visitTime){
                    this.updateFormSigning.visitTime='';
                }
                if( this.updateFormSigning.visitType){
                    this.updateFormSigning.visitType='';
                }
            },

            submitForm(formName) {
                if(this.formSigning.visitTime){
                    this.formSigning.visitTime = new Date( this.formSigning.visitTime);
                }
                if( this.formSigning.payTime){
                    this.formSigning.payTime = new Date( this.formSigning.payTime);
                }
                this.formSigning.amountPerformance =  this.formSigning.performanceAmount;
                this.formSigning.payMode = mainDivVM.tansPayModeNameToValue(this.formSigning.payModes);
                var param = this.formSigning;
                // 设置 clueid
                this.$refs[formName].validate((valid) => {
                    if(mainDivVM.addSignButtonAble==true){
                        return ;
                    }
                    if (valid) {
                        mainDivVM.addSignButtonAble =true;
                        axios.post("/businesssign/insert", param)
                            .then(function (response) {
                                if (response.data.code == 0) {
                                    mainDivVM.$message({type: 'success', message: '签约单保存成功!',duration:2000,onClose:function(){
                                            //刷新当前页面
                                            //window.location.href='/businesssign/visitRecordPage?clueId='+vclueId+'&signId='+vsignId+'&readyOnly=1';
                                            mainDivVM.addSignButtonAble = false;
                                            //跳转list页面
                                            window.location.href='/aggregation/businessMyCustomer/listPage';
                                        }});
                                } else {
                                    mainDivVM.addSignButtonAble = false;
                                    mainDivVM.$message.error(response.data.msg);
                                }
                            }).catch(function (error) {
                            console.log(error);
                            mainDivVM.addSignButtonAble = false;
                        });
                    } else {return false;}
                });
            },

            tansPayModeNameToValue(payModes){
                var payModeArr = [];
                for(var i = 0 ; i < payModes.length;i++){
                    for(var j = 0 ; j < payModeItem.length ; j++){
                        if(payModes[i]==payModeItem[j].name){
                            payModeArr.push(payModeItem[j].value);
                        }
                    }
                }
                return payModeArr.join(",");
            },
            submitDialogForm(formName) {
                if( this.formMoneyDetail.payTime){
                    this.formMoneyDetail.payTime = new Date( this.formMoneyDetail.payTime)
                }
                if(this.formMoneyDetail.visitTime){
                    this.formMoneyDetail.visitTime = new Date( this.formMoneyDetail.visitTime)
                }
                this.formMoneyDetail.amountPerformance= this.formMoneyDetail.performanceAmount;
                this.formMoneyDetail.payMode = mainDivVM.tansPayModeNameToValue(this.formMoneyDetail.payModes);
                var param = this.formMoneyDetail;
                param.signId = vsignId;
                param.clueId =vclueId;
                this.$refs[formName].validate((valid) => {
                    if( mainDivVM.addPayDetailButtonAble == true){
                        return;
                    }
                    if (valid) {
                        mainDivVM.addPayDetailButtonAble=true;
                        axios.post("/payDetail/insert", param)
                            .then(function (response) {
                                if (response.data.code == 0) {
                                    mainDivVM.$message({type: 'success', message: '付款明细保存成功!',duration:2000,onClose:function(){
                                            mainDivVM.dialogFormVisible = false;
                                            mainDivVM.addPayDetailButtonAble=false;
                                            //  跳转回上一页：
                                            window.location.href='/businesssign/visitRecordPage?clueId='+vclueId+'&signId='+vsignId+'&readyOnly=1';
                                        }});
                                } else {
                                    mainDivVM.$message.error(response.data.msg);
                                    mainDivVM.addPayDetailButtonAble=false;
                                }
                            }).catch(function (error) {mainDivVM.addPayDetailButtonAble=false;console.log(error);});
                    } else {
                        return false;
                    }
                });
            },

            resetForm(formName) {
                if( mainDivVM.$refs[formName]) {
                    mainDivVM.$refs[formName].resetFields();
                }
            },
            changePayType(val) {
                if (val == 3) {
                    this.isAllMoney = true;
                } else {
                    this.isAllMoney = false;
                }
            },
            initList(){
                // var param = {};
                // axios.post('/busVisitRecord/queryList',param).then(function (response) {
                //     if(null===response||response.data==null||response.data.code!='0'){
                //         if(response.data.code!='0'){
                //             mainDivVM.$message({message: response.data.msg, type: 'warning'});
                //         }
                //         return false;
                //     }else{
                //         mainDivVM.showVisitAduitDatas.visitTableData =response.data.data;
                //         if(response.data.data.length>0){
                //             mainDivVM.showVisitAduitDatas.notSignReason = response.data.data[0].notSignReason
                //         }
                //     }
                // })
            },
            number(){//添加更多签约单业绩金额
                this.formSigning.performanceAmount=this.formSigning.performanceAmount.replace(/[^\.\d]/g,'');
                this.formSigning.performanceAmount=this.formSigning.performanceAmount.replace('.','');
            },
            number2(){//添加更多签约单业绩金额
                this.formMoneyDetail.amountPerformance=this.formMoneyDetail.amountPerformance.replace(/[^\.\d]/g,'');
                this.formMoneyDetail.amountPerformance=this.formMoneyDetail.amountPerformance.replace('.','');
            },
            editRebutSign(row) {
                this.resetForm("updateFormSigning");
                var param = {};
                param.id = row.signId
                param.signId = row.signId
                param.clueId = row.clueId
                axios.post('/businesssign/querySignById', param).then(function (response) {
                    if (null === response || response.data == null || response.data.code != '0') {
                        if (response.data.code != '0') {
                            mainDivVM.$message({message: response.data.msg, type: 'warning'});
                        }
                        return false;
                    } else {
                        //设置显示数据
                    debugger
                        var sign = response.data.data;
                        mainDivVM.signStoreTypeArr = response.data.data.vistitStoreTypeArr;
                        mainDivVM.updateFormSigning.customerName = sign.customerName;
                        mainDivVM.updateFormSigning.signNo = sign.signNo;
                        mainDivVM.updateFormSigning.idCard = sign.idCard;
                        mainDivVM.updateFormSigning.phone = sign.phone;
                        mainDivVM.updateFormSigning.signCompanyId = sign.signCompanyId;
                        mainDivVM.updateFormSigning.signProjectId = sign.signProjectId;
                        mainDivVM.updateFormSigning.signProvince = sign.signProvince;
                        mainDivVM.updateFormSigning.signCity = sign.signCity;
                        mainDivVM.updateFormSigning.signDictrict = sign.signDictrict;
                        mainDivVM.updateFormSigning.signShopType = sign.signShopType;
                        mainDivVM.updateFormSigning.amountReceivable = sign.amountReceivable;
                        mainDivVM.updateFormSigning.signType = sign.signType;
                        mainDivVM.updateFormSigning.isRemoteSign = sign.isRemoteSign;
                        if(response.data.data.payName == null || response.data.data.payName == ''){
                            mainDivVM.updateFormSigning.payName=mainDivVM.updateFormSigning.customerName;
                        }
                        mainDivVM.currentCity(sign.signCity);
                        mainDivVM.currentProvince(sign.signProvince);
                        mainDivVM.getShopType(sign.signProjectId,1);
                        mainDivVM.change
                        mainDivVM.dialogUpdateFormSigningVisible = true;
                        // 判断签约类型是一次性全款的话就不显示余款金额和预计补齐时间
                        if (sign.signType&&sign.signType==1) {
                            mainDivVM.showfalg=false;
                        }
                        // 判断是否远程签约
                        if(sign.isRemoteSign&&sign.isRemoteSign==1){//1是远程签约，不显示到访记录
                            mainDivVM.suppWrapBox=false;
                        }else{
                            mainDivVM.suppWrapBox=true;
                        }
                    }
                })
            },
            changeUpdateSignProvince(selVal) {
                mainDivVM.updateFormSigning.signCity = '';
                mainDivVM.updateFormSigning.signDictrict = '';
                mainDivVM.districtArr = []
                this.currentProvince(selVal);
            },
            changeUpdateSignCity(selVal) {
                mainDivVM.updateFormSigning.signDictrict = '';
                this.currentCity(selVal);
            },
            changeSignProvince(selVal) {
                mainDivVM.formSigning.signCity = '';
                mainDivVM.formSigning.signDictrict = '';
                mainDivVM.districtArr = []
                this.currentProvince(selVal);
            },
            changeSignCity(selVal) {
                mainDivVM.formSigning.signDictrict = '';
                this.currentCity(selVal);
            },
            selectUpdateSigningType(pa1) { //是不是全款
                // this.updateFormSigning.amountBalance = '';
                // this.updateFormSigning.makeUpTime = '';
                if (pa1 == '1') {
                    this.updateFormSigning.payType = '1';
                    this.showfalg = false;
                    // 如果是一次性付款，全款就锁死
                    this.payTypeSelect=true;
                } else {
                    this.updateFormSigning.payType = '2';
                    this.showfalg = true;
                    // 如果下拉是追加定金和尾款,则放开
                    for(var i=0;i<this.payTypeArr.length;i++){
                        if(this.payTypeArr[i].value!="2"){
                            this.payTypeSelect=false;
                        }
                    }
                }
            },
            updateFormSigningAmountPerformance() {
                var aone = parseFloat(this.updateFormSigning.amountReceived);
                var atwo = parseFloat(this.updateFormSigning.firstToll);
                var athree = parseFloat(this.updateFormSigning.amountEquipment);
                if (isNaN(aone)) aone = 0
                if (isNaN(atwo)) atwo = 0
                if (isNaN(athree)) athree = 0
                this.updateFormSigning.performanceAmount = (aone + atwo + athree) + ""
            },
            submitUpdateForm(formName) {
                console.log("点击提交添加付款")
                this.updateFormSigning.amountPerformance = this.updateFormSigning.performanceAmount;
                var param = this.updateFormSigning;
                if (param.makeUpTime) {
                    param.makeUpTime = new Date(param.makeUpTime)
                }
                if (param.payTime) {
                    param.payTime = new Date(param.payTime)
                }
                param.clueId= vclueId;
                param.signId= vsignId;
                this.updateFormSigning.payMode = mainDivVM.tansPayModeNameToValue(this.updateFormSigning.payModes);
                // 设置 clueid
                this.$refs[formName].validate((valid) => {
                    if (mainDivVM.updateSignButtonAble == true) {
                        return;
                    }
                    if (valid) {
                        mainDivVM.updateSignButtonAble = true;
                        axios.post("/businesssign/updateSignDetail", param)
                            .then(function (response) {
                                if (response.data.code == 0) {
                                    mainDivVM.$message({
                                        type: 'success', message: '付款明细保存成功!', duration: 2000, onClose: function () {
                                            mainDivVM.dialogFormVisible = false;
                                            mainDivVM.addPayDetailButtonAble=false;
                                            //  跳转回上一页： /businesssign/visitRecordPage
                                            window.location.href='/businesssign/visitRecordPage?clueId='+vclueId+'&signId='+vsignId+'&readyOnly=1&type=0';
                                        }
                                    });
                                } else {
                                    mainDivVM.$message.error(response.data.msg);
                                    mainDivVM.updateSignButtonAble = false;
                                }
                            }).catch(function (error) {
                            mainDivVM.updateSignButtonAble = false;
                            console.log(error);
                        });
                    } else {
                        return false;
                    }
                });
            },
            submitUpdateForm1(formName) {
                console.log("点击提交修改付款明细")
                this.updateFormSigning.amountPerformance = this.updateFormSigning.performanceAmount;
                var param = this.updateFormSigning;
                if (param.makeUpTime) {
                    param.makeUpTime = new Date(param.makeUpTime)
                }
                if (param.payTime) {
                    param.payTime = new Date(param.payTime)
                }
                param.clueId= vclueId;
                param.signId= vsignId;
                // 修改付款明细的id
                param.payDetailId= this.payDetailId;
                this.updateFormSigning.payMode = mainDivVM.tansPayModeNameToValue(this.updateFormSigning.payModes);
                // 设置 clueid
                this.$refs[formName].validate((valid) => {
                    if (valid) {
                        this.$prompt('您确认进行修改吗？修改后信息将进行变更，请输入变更备注。', '编辑备注', {
                            confirmButtonText: '确定',
                            cancelButtonText: '取消',
                            // inputPattern: /\S/,
                            // inputPattern: /^\S{1,200}$/,
                            inputPattern: /^(?=.*?\S)[\s\S]{0,200}$/,
                            inputErrorMessage: '编辑备注不能为空，且不允许超200字符',
                            inputPlaceholder:'输入变更备注'
                        }).then(({ value }) => {
                            // 修改付款明细的备注
                            console.log(value)
                            param.operationRemark=value;
                            axios.post("/payDetail/payOrSignUpdate", param)
                                .then(function (response) {
                                    if (response.data.code == 0) {
                                        mainDivVM.$message({
                                            type: 'success', message: '付款明细修改成功!', duration: 2000, onClose: function () {
                                                mainDivVM.dialogFormVisible = false;
                                                mainDivVM.addPayDetailButtonAble=false;
                                                //  跳转回上一页： /businesssign/visitRecordPage
                                                window.location.href='/businesssign/visitRecordPage?clueId='+vclueId+'&signId='+vsignId+'&readyOnly=1&type=0&showSignButton=1';
                                                // showSignButton=1 表示不展示添加签约单按钮
                                            }
                                        });
                                    } else {
                                        mainDivVM.$message.error(response.data.msg);
                                    }
                                }).catch(function (error) {
                                console.log(error);
                            });
                        }).catch(() => {
                            this.$message({
                                type: 'info',
                                message: '取消操作'
                            });
                        });

                    } else {
                        return false;
                    }
                });
            },
            goback(){window.history.go(-1);},
        },
        created(){
            // this.initList();
            //  到访店铺类型 vistitStoreTypeArr
            // var param={};
            // param.groupCode="vistitStoreType";
            // axios.post('/dictionary/DictionaryItem/dicItemsByGroupCode',param).then(function (response) {
            //     mainDivVM.vistitStoreTypeArr=response.data.data;
            // });

            param = {};
            param.groupCode = "payMode";
            axios.post('/dictionary/DictionaryItem/dicItemsByGroupCode', param).then(function (response) {
                mainDivVM.option3s = response.data.data;
            });

            //初始化省份
            param={};
            param.type="0";
            axios.post('/area/sysregion/querySysRegionByParam',param).then(function (response) {
                mainDivVM.provinceArr=response.data.data.data;
            });

            // 考察公司
            param={};
            axios.post('/aggregation/businessMyCustomer/listNoPage',param).then(function (response) {
                mainDivVM.companyArr=response.data.data;
            });

            param = {};
            param.groupCode = "visitCity";
            axios.post('/dictionary/DictionaryItem/dicItemsByGroupCode', param).then(function (response) {
                mainDivVM.visitCityArr = response.data.data;
            });
        },
        mounted(){
            document.getElementById('businessContractRecord').style.display = 'block';
        }
    });

</script>
</body>
</html>